package com.cli.springbootkafka.controller;

import com.cli.springbootkafka.producer.KfkaProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author xiongmin
 * @Description //TODO
 * @Date 2020/6/13 16:19
 * @Version 1.0
 **/
@Controller
public class KafkaTestController {

    @Autowired
    private KfkaProducer producer;

    @RequestMapping("/testSendMsg")
    @ResponseBody
    public String testSendMsg(){
        producer.send();
        return "success";
    }

}
